package thread;

import java.util.Random;
import java.util.concurrent.atomic.AtomicLong;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 25397
 * Date: 2022-03-29
 * Time: 19:37
 */
public class TestDemo {

    public static void main(String[] args) throws InterruptedException {


        Thread c=new Thread(()->{
            System.out.println("我是c线程");
        });
        c.start();

        Thread b=new Thread(()->{
            try {
                c.join();
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            System.out.println("我是b线程");
        });
        b.start();

        Thread a=new Thread(()->{
            try {
                b.join();
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            System.out.println("我是a线程");
        });
        a.start();


    }

}
